package com.vip.shopdao.action.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.vip.shopbase.Domain.BaseEntity;

import javax.persistence.*;
import java.util.List;

@Entity
public class ActionKind extends BaseEntity<Long> {
    @Column
    private String name;
    @JsonIgnoreProperties(value = "actionKind",allowSetters = true)
    @OneToMany(mappedBy = "actionKind",cascade = {CascadeType.REMOVE,CascadeType.REFRESH},fetch = FetchType.LAZY)
    private List<Action> actions;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Action> getActions() {
        return actions;
    }

    public void setActions(List<Action> actions) {
        this.actions = actions;
    }
}
